import axios from 'axios'
// import { localGet } from "@/library/js/storage"; // 导入存储函数
import {config} from "../../../../../config/env-configs"

const service = axios.create({
    baseURL: config.video.baseURL, // url = base url + request url
    withCredentials: false, // send cookies when cross-domain requests
    timeout: 200000 // request timeout
})

  

// request interceptor
// service.interceptors.request.use(
//     config => {
//         let token =  localGet('token');
//         if(token) config.headers['Authorization'] = token;
     
//         return config
//     },
//     error => {
//         // do something with request error
//         console.log(error) // for debug
//         return Promise.reject(error)
//     }
// )

export default service